Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'view by school' distribution graph #864

Merged
merged 6 commits into from
Oct 17, 2024
Merged

Fix 'view by school' distribution graph #864

merged 6 commits into from
Oct 17, 2024

Conversation

kellyel
Copy link
Collaborator

@kellyel kellyel commented Oct 10, 2024

Proposed changes

The issue: unenrolled students will not have a schoolId in their schools.current array. Therefore, when viewing the distribution graph by school, it will attempt to organize by a field in which some students have undefined as a value.

The solution here is to cross reference a student's schools.all and the assignment's assigningOrgs.schools to find the school that the user was a member of when it was assigned. If that fails, we fallback to '0 Unknown School' to prevent the graph from failing catastrophically.

Rather than doing the cross-referencing on the front end, we will utilize the assignment doc's assigningOrgs object which is already an intersection of the administration's assigning orgs and the user's orgs at the time of assignment. This is much more efficient and eliminates the possibility of a user being listed under the wrong school.

Types of changes

What types of changes does this pull request introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (non-breaking change that does not add functionality but makes code cleaner or more efficient)
  • Documentation Update
  • Tests (new or updated tests)
  • Style (changes to code styling)
  • CI (continuous integration changes)
  • Repository Maintenance
  • Other (please describe below)

Checklist

  • I have read the guidelines for contributing.
  • The changes in this PR are as small as they can be. They represent one and only one fix or enhancement.
  • Linting checks pass with my changes.
  • Any existing unit tests pass with my changes.
  • Any existing end-to-end tests pass with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • If this PR fixes an existing issue, I have added a unit or end-to-end test that will detect if this issue reoccurs.
  • I have added JSDoc comments as appropriate.
  • I have added the necessary documentation to the roar-docs repository.
  • I have shared this PR on the roar-pr-reviews channel (if I have access)
  • I have linked relevant issues (if any)

Justification of missing checklist items

Further comments

@kellyel kellyel requested a review from a team as a code owner October 10, 2024 16:10
Copy link

github-actions bot commented Oct 10, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 5.07% 390 / 7685
🔵 Statements 4.97% 421 / 8459
🔵 Functions 6.09% 115 / 1887
🔵 Branches 2.42% 110 / 4544
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/pages/ScoreReport.vue 0% 0% 0% 0% 356, 313-315, 317, 332, 334-339, 335-337, 336, 338, 341-345, 347-350, 348-349, 352, 354, 357, 357, 359-408, 360-362, 365-368, 367, 371, 373-392, 374-375, 375, 378-379, 381-384, 383, 386-388, 387, 389-391, 390, 395-398, 397, 399-405, 407, 410-419, 421-426, 422-425, 428, 430-432, 434-436, 438, 440-443, 442, 445-447, 449-452, 451, 458-460, 462-469, 463-468, 465-466, 471-478, 472-477, 474-475, 482-513, 483-512, 484-512, 486-512, 488-512, 490-512, 495-501, 500, 502-512, 504-509, 506, 508, 510-512, 511, 514, 517-561, 529-532, 534-548, 539-545, 540-541, 543-544, 547, 550, 550-551, 551, 553-560, 563-583, 564, 564-582, 566-577, 567-573, 575-576, 578-581, 588-842, 589-841, 590, 593, 595, 597-806, 599, 603-608, 607, 610-612, 614, 616-636, 638-799, 642-649, 646, 648, 650-654, 651, 653, 656-663, 657-663, 660, 662, 665-667, 666, 670, 673-682, 684-690, 685-690, 687-690, 689, 692, 695-706, 708-742, 709-742, 718-719, 721-742, 730, 732-741, 743-761, 744-754, 752, 755, 757-760, 762-775, 763-767, 767-768, 768-769, 769-774, 778-792, 794-798, 795, 797, 802-803, 805, 809-834, 810-813, 812, 815-818, 817, 820-830, 822-827, 826, 828-830, 829, 832-833, 836-838, 837, 840, 845-846, 850-855, 851, 853, 857, 859-864, 890-991, 891-988, 892-898, 900-902, 901, 904-906, 905, 908-985, 909-910, 913-931, 914-931, 918-931, 922-931, 925, 927-930, 934-951, 935-948, 937-945, 938-940, 939, 941-942, 944, 947, 950, 954-984, 955, 955, 957-983, 958-972, 959, 962-971, 963, 966-970, 967, 969, 975-982, 976, 979-981, 980, 987, 990, 1000-1058, 1001-1002, 1005-1010, 1007-1009, 1008, 1013, 1016, 1019-1023, 1021, 1021, 1026-1038, 1029-1031, 1030, 1032-1034, 1033, 1035, 1035-1036, 1041-1047, 1042-1045, 1044, 1046, 1050-1054, 1057, 1061-1062, 1065, 1067-1105, 1068-1074, 1076-1082, 1078-1081, 1079-1080, 1084, 1084, 1086-1087, 1089-1090, 1090, 1092-1103, 1093-1103, 1100-1103, 1102, 1104, 1109-1298, 1110, 1110-1135, 1125-1134, 1136-1145, 1136-1144, 1146-1159, 1146-1158, 1148-1155, 1157, 1160-1162, 1160-1161, 1164, 1166-1177, 1167-1176, 1179-1187, 1180-1186, 1189-1195, 1190-1194, 1191, 1193, 1197-1203, 1206-1212, 1207-1211, 1208-1210, 1209, 1215-1220, 1223-1227, 1224-1226, 1225, 1229-1296, 1231, 1234-1262, 1235-1262, 1242-1262, 1249, 1251-1261, 1252-1261, 1254-1261, 1256-1261, 1258, 1260, 1264, 1266-1276, 1273, 1275, 1278-1295, 1290-1292, 1291, 1293, 1297, 1300-1304, 1301-1303, 1302, 1302-1303, 1306-1317, 1307-1308, 1308-1309, 1309, 1311-1313, 1312, 1315-1316, 1319-1323, 1320-1322, 1321, 1326-1332, 1327-1328, 1328, 1330-1331, 1334-1336, 1335, 1335, 1338-1343, 1339-1342, 1342, 2-3, 8, 12-13, 15-16, 21-22, 27, 29, 63, 66-67, 69, 78-79, 82, 96-97, 103, 109, 116, 125, 1, 146, 159, 165, 171, 177, 194, 246-247, 1-31, 48, 139-140, 1-149
Generated in workflow #749 for commit abb28a6 by the Vitest Coverage Report Action

Copy link

github-actions bot commented Oct 10, 2024

Visit the preview URL for this PR (updated for commit abb28a6):

https://roar-staging--pr864-fix-school-graphs-96lw3meh.web.app

(expires Wed, 23 Oct 2024 20:34:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460

Copy link

cypress bot commented Oct 10, 2024

roar-dashboard-e2e    Run #8479

Run Properties:  status check passed Passed #8479  •  git commit abb28a66b1: Component Tests for PR 864 "Fix 'view by school' distribution graph" from commit...
Project roar-dashboard-e2e
Run status status check passed Passed #8479
Run duration 02m 30s
Commit git commit abb28a66b1: Component Tests for PR 864 "Fix 'view by school' distribution graph" from commit...
Committer Elijah Kelly
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 17

@Emily-ejag Emily-ejag added the bug Something isn't working label Oct 10, 2024
@ksmontville ksmontville linked an issue Oct 10, 2024 that may be closed by this pull request
src/pages/ScoreReport.vue Outdated Show resolved Hide resolved
@richford richford merged commit 2b79488 into main Oct 17, 2024
24 checks passed
@richford richford deleted the fix/school-graphs branch October 17, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Score Report Data is Malformed
4 participants